
/*------------------------------------------------------------------*/

/*------------------------------------------------------------------*/


#ifndef		__PINCFG_H
#define		__PINCFG_H

#include "sys.h"

#define Led1()                           PBOut(4)
#define Led2()                           PBOut(3)
#define Led3()                           PDOut(7)

#define KeyB2St()                        PAIn(0)
#define KeyB3St()                        PEIn(0)
#define KeyB4St()                        PEIn(1)

//SPI for LCD moudle
#define SPI3_CLK                         PEOut(2)
#define SPI3_MOSI                        PEOut(6)
#define SPI3_MISO                        PEOut(5)
#define SPI_T_CS                         PDOut(0)
#define SPI_F_CS                         PEOut(4)
#define SPI_SDCS                         PEOut(4)

//SDIO SD CARD
#define SDIO_CMD                         PD2
#define SDIO_D0                          PC8
#define SDIO_D1                          PC9
#define SDIO_D2                          PC10
#define SDIO_D3                          PC11
#define SDIO_CK                          PC12
#define SD_CD                            PCOut(7)
#define SD_CD_ST()                       (GPIO_ISTAT(GPIOC) & GPIO_PIN_7)

//wifi moudle control
#define WIFI_TX                          PA9
#define WIFI_RX                          PA10
#define WIFI_RST                         PAOut(8)

//------------------------------pin function define---------------------------//
#if   defined ( __ICCARM__ )
#define __nop() __no_operation()
#define _nop_() __no_operation()
#else
#define _nop_() __nop()
#endif

#define NOP1()  _nop_()
#define NOP2()  NOP1();NOP1()
#define NOP3()  NOP2();NOP1()
#define NOP4()  NOP3();NOP1()
#define NOP5()  NOP4();NOP1()
#define NOP6()  NOP5();NOP1()
#define NOP7()  NOP6();NOP1()
#define NOP8()  NOP7();NOP1()
#define NOP9()  NOP8();NOP1()
#define NOP10() NOP9();NOP1()
#define NOP11() NOP10();NOP1()
#define NOP12() NOP11();NOP1()
#define NOP13() NOP12();NOP1()
#define NOP14() NOP13();NOP1()
#define NOP15() NOP14();NOP1()
#define NOP16() NOP15();NOP1()
#define NOP17() NOP16();NOP1()
#define NOP18() NOP17();NOP1()
#define NOP19() NOP18();NOP1()
#define NOP20() NOP19();NOP1()
#define NOP21() NOP20();NOP1()
#define NOP22() NOP21();NOP1()
#define NOP23() NOP22();NOP1()
#define NOP24() NOP23();NOP1()
#define NOP25() NOP24();NOP1()
#define NOP26() NOP25();NOP1()
#define NOP27() NOP26();NOP1()
#define NOP28() NOP27();NOP1()
#define NOP29() NOP28();NOP1()
#define NOP30() NOP29();NOP1()
#define NOP31() NOP30();NOP1()
#define NOP32() NOP31();NOP1()
#define NOP33() NOP32();NOP1()
#define NOP34() NOP33();NOP1()
#define NOP35() NOP34();NOP1()
#define NOP36() NOP35();NOP1()
#define NOP37() NOP36();NOP1()
#define NOP38() NOP37();NOP1()
#define NOP39() NOP38();NOP1()
#define NOP40() NOP39();NOP1()
#define NOP(N)  NOP##N()

#endif
